let notification = {
  namespaced: true,
  state: {},
  mutations: {},
  actions: {
    success: (context, {vue, title, message}) => {
      title || (title = '操作成功')
      vue.$notify({
        title: title,
        message: message,
        type: 'success'
      })
    },
    warning: (context, {vue, title, message}) => {
      title || (title = '警告')
      vue.$notify({
        title: title,
        message: message,
        type: 'warning'
      })
    },
    message: (context, {vue, title, message}) => {
      title || (title = '消息')
      vue.$notify.info({
        title: title,
        message: message
      })
    },
    error: (context, {vue, title, message}) => {
      title || (title = '错误')
      vue.$notify.error({
        title: title,
        message: message
      })
    }
  }
}

export default notification
